Barcodes Human Readable Text
The Human Readable Text in a barcode is an optional feature that enables printing the encoded data of the barcode using human readable text. It can also be used to verify the contents of the barcode visually.
Properties
FontFace | Specify the name of the font to use for rendering the human readable text. |
HatchLineAngle | Specify the angle of the hatch lines. |
HatchLineSpace | Specify the line gap between hatch lines. |
JustifyText | Enables text justification. |
OverrideDefaultTextHeight | Disables the automatic text height calculation. |
OverrideDefaultTextMargin | Disables the automatic text margin calculation. |
TextHeight | Height of the human readable text (This will only get affected if OverrideDefaultTextHeight is set to true). |
TextMargin | Name space to access the text margin settings |
Copy
Example
--This program will scan a Codabar barcode
--Millimeters mode selected
SetUnits(Units.Millimeters)
--Laser Parameter settings
Laser.JumpSpeed = 2000
Laser.MarkSpeed = 1000
--Delay settings
Laser.JumpDelay = 150
Laser.MarkDelay = 200
--Assign Codabar barcode to variable "var"
var = Barcodes.Codabar()
--Barcode height is 12.5
var.Height = 12.5
--Barcode width is 35.5
var.Width = 35.5
--x position of the barcode
var.X = 0.5
--Y position of the barcode
var.Y = 0.5
--10 degree angle to the canvas
var.Angle = 10
--Set print ratio as 3
var.PrintRatio = 3
--Apply VerticalSerpentine hatch pattern
var.HatchStyle = HatchStyle.VerticalSerpentine
--Barcode includes "C125345" text as the string
var.Text = "C125345"
--0.26 unit hatch line gap
var.LineSpace = 0.26
--Hatching of the barcode will be marked before the barcode outline
var.MarkingOrder = MarkingOrder.HatchBeforeOutline
--Enable human readable text
var.ShowHumanReadableText = true
--Outline of the Human Readable text will be marked before its filling
var.HumanReadableMarkingOrder = MarkingOrder.OutlineBeforeHatch
--Set font name of the human readable text
var.HumanReadableText.FontFace = 'Arial'
--Define the hatch line gap of the human readable text
var.HumanReadableText.HatchLineSpace = 0.01
--Define the hatch line angle of the human readable text
var.HumanReadableText.HatchLineAngle = 0.01
--disables automatic calculation of a suitable text height
var.HumanReadableText.OverrideDefaultTextHeight = true
--specify the height of the text
var.HumanReadableText.TextHeight = 1.27
--Disables autmatic text margin calculations
var.HumanReadableText.OverrideDefaultTextMargin = true;
--speficy the top margin
var.HumanReadableText.TextMargin.Top = .25
--speficy the right margin
var.HumanReadableText.TextMargin.Right = .25
--speficy the bottom margin
var.HumanReadableText.TextMargin.Bottom = .25
--speficy the left margin
var.HumanReadableText.TextMargin.Left = .25
--Mark Codabar barcode
Image.Barcode(var)